﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCNewsDetail.ascx.cs" 
    Inherits="RedHouse.AdminControl.UserControls.UCNewsDetail" %>
<form method="post" action="#">
<!-- Form -->
<!-- Fieldset -->
<script type="text/javascript">
    $(document).ready(function () {
        $("#txtDesc").cleditor({ width: 600, height: 300, useCSS: true })[0].disable(false).refresh();
        $('#txtStartDate').datepicker();
        $('#txtEndDate').datepicker();
    });
    function OnSubmit() {
        var desc = $("#txtDesc").val();

        var startDate = $("#txtStartDate").val();
        var endDate = $("#txtEndDate").val();

        $("#ctl00_MainContent_NewsDetail_hdfDesc").val(desc);
        $("#ctl00_MainContent_NewsDetail_hdfStartDate").val(startDate);
        $("#ctl00_MainContent_NewsDetail_hdfEndDate").val(endDate);
    }
</script>
<asp:Panel ID="ErrorPanel" runat="server">
    <div class="err">
        <div class="err_icon">
            <!-- -->
        </div>
        <a href="#" class="close" title="Close this notification">x</a>
        <div class="desc">
            <span>Error!</span>
            <p>
                <%=this.Message %></p>
        </div>
    </div>
</asp:Panel>
<asp:Panel ID="SuccessPanel" runat="server">
    <div class="succes">
        <div class="succes_icon">
            <!-- -->
        </div>
        <a href="#" class="close" title="Close this notification">x</a>
        <div class="desc">
            <span>Success!</span>
            <p>
                <%=this.Message %></p>
        </div>
    </div>
</asp:Panel>
<div class="clear">
    <!-- -->
</div>
<fieldset>
    <legend>Create News</legend>
    <div class="input_field">
        <label for="lf">
            Title:
        </label>
        <asp:TextBox CssClass="bigfield" ID="txtName" runat="server" />
        <%-- <span class="validate_success">A positive message!</span>--%>
    </div>
    <div class="input_field">
        <label for="dropdown">
            Location:
        </label>
        <asp:DropDownList CssClass="dropdown" ID="cboLocation" runat="server" />
    </div>
    <div class="input_field">
        <label for="dropdown">
            Category:
        </label>
        <asp:DropDownList CssClass="dropdown" ID="cboCategory" runat="server" />
    </div>
    <div class="input_field">
        <label for="dropdown">
            Language:
        </label>
        <asp:DropDownList CssClass="dropdown" ID="cboLanguage" runat="server" />
    </div>
    <div class="input_field">
        <label for="dropdown">
            Image Url:
        </label>
        <asp:TextBox CssClass="bigfield" ID="txtImageUrl" runat="server" />
    </div>
    <div class="input_field">
        <label for="dropdown">
            Start Date:
        </label>
        <input type="text" class="mediumfield" id="txtStartDate" />
        <asp:HiddenField ID="hdfStartDate" Value="" runat="server" />
    </div>
    <div class="input_field">
        <label for="dropdown">
            End Date:
        </label>
        <input type="text" class="mediumfield" id="txtEndDate" />
        <asp:HiddenField ID="hdfEndDate" Value="" runat="server" />
    </div>
    <div class="input_field">
        <label>
            Description:</label>
    </div>
    <div class="input_field">
        <textarea cols="50" rows="10" id="txtDesc" ></textarea>
        <asp:HiddenField ID="hdfDesc" Value="" runat="server" />
    </div>
    <div class="input_field no_margin_bottom">
        <asp:Button class="submit" ID="btnSave" OnClientClick="javascript:OnSubmit()" runat="server" Text="Save" />
        <input class="submit" type="reset" value="Reset" onclick="this.form.reset();" />
    </div>
    <asp:HiddenField ID="hdfId" Value="" runat="server" />
</fieldset>
<!-- End of fieldset -->
</form>
<!-- /Form -->
